<include file="Public:header" />

<script>
function copyPages(){
		var ids=new Array();
		$('.sall').each(function(index, element) {
            if($(this).prop('checked')==true){
				ids.push($(this).val());
			}
        });
		if(ids.length>0){
			art.dialog.open('{:U('showcopybox')}?pages_id='+ids.toString(), {width: 400, height: 100,lock:true,title:'复制页面'});
			   
			
		}else{
			error('请选择要复制的页面');
		}
	}
</script>

<div class="container main"> <include file="Public:left" />
  <div class="w790">
   <div class="h">
   
   
   <a href="{:U('add')}" target="_blank" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>新增页面</a>
   
   
   
   
      </div>
     <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td align="center">ID</td>
    <td align="center">效果图</td>
    <td align="center">页面名称</td>
    <td align="center">主颜色</td>

    <td align="center">启用</td>
    <td align="center">所属分类</td>
    <td align="center">操作</td>
  </tr>
</thead> 
<volist name="list" id="vo">
  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" /></td>
    <td><img src="<notempty name="vo['img_url']">{:getThumbPath($vo['img_url'])}<else/>/Home{$vo.name}/view.jpg</notempty>" height="100" /></td>
    <td><span class="ajaxText" tablename="Pages" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
    <td style="background:{$vo.color}"></td>
    
    <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span><else/><span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
    <td align="center">&nbsp;</td>
    <td align="center"><a href="{:U('copy',array('copyToSelf' => 1,'id'=>$vo['id']))}">复制</a> | <a onclick="mydialog.open('/Admin/Pages/info/id/{$vo.id}.html',{width: 500, height: 500,lock:true,title:'编辑模块'});" href="javascript:;">修改信息</a> | <a target="_blank" href="{:U('edit',array('id'=>$vo['id']))}">修改布局</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');">删除</a></td>
  </tr>
</volist>
 
    
</table>






<div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> 
        
        <a href="javascript:void(0);" class="btn btn-success btn-sm" onClick="copyPages();"><i class="fa fa-copy"></i> 复制选中页面</a>
        
       </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>



</div>

  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />